<template>
  <page-body>
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center account_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub account_fd0_0'>
          <view class='flex flex-wrap align-center account_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            :data-url="1">
            <text class='fu-iconfont2  account_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='account_fd0_0_c1_c0'>账号与安全</text>
          </view>
          <view class='flex flex-wrap align-center justify-end account_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout account_flex_1">
        <view class='flex flex-direction flex-wrap align-stretch flex-sub account_fd1_0'>
          <view class='flex flex-wrap align-center justify-between flex-sub account_fd1_0_c0' @tap.stop="handleJumpDiy"
            data-type="navigateTo" :data-url="`/pages/My/changePass/changePass`">
            <text class='account_fd1_0_c0_c0'>修改密码</text>
            <text class='fu-iconfont2  account_fd1_0_c0_c1'>&#xe7f2;</text>
          </view>
          <view class='flex flex-wrap align-center justify-between flex-sub account_fd1_0_c1' @tap.stop="jump(info.is_bang)">
            <text class='account_fd1_0_c0_c0'>{{info.is_bang==1?'修改':'绑定'}}手机号</text>
            <text class='fu-iconfont2  account_fd1_0_c0_c1'>&#xe7f2;</text>
          </view>
        </view>
      </view>

      <!---flex布局flex布局结束-->
      <view class="flex flex-direction flex-wrap align-center benben-position-layout flex account_flex_2"
        :style="{height:(150+bottomSafeAreaRpx)+'rpx',paddingBottom:bottomSafeAreaRpx+'rpx', }">
        <button class='account_fd2_0' @tap.stop="popupShow1724834220700=true">退出登录</button>

      </view>
      <view :style="{height: (150+bottomSafeAreaRpx)+'rpx'}"></view>
      <benben-popup v-model="popupShow1724834220700" :mask="true" :mask-close-able="true" mode='center'
        :z-index='999999'>
        <!---flex布局flex布局开始-->
        <view class="flex benben-flex-layout flex-wrap align-center">
          <view class='flex flex-direction flex-wrap align-stretch justify-between account_fd3_0'>
            <view class='flex flex-direction flex-wrap align-center justify-around account_fd3_0_c0'>
              <text class='account_fd3_0_c0_c0'>提示</text>
              <text class='account_fd3_0_c0_c1'>确定退出当前账号？</text>
            </view>
            <view class='flex flex-wrap align-center justify-center account_fd3_0_c1'>
              <view class='flex flex-wrap align-center justify-center account_fd3_0_c1_c0'>
                <text class='account_fd3_0_c1_c0_c0' @top.stop="popupShow1724834220700=false">取消</text>
              </view>
              <view class='flex flex-wrap align-center justify-center account_fd3_0_c1_c1' @tap.stop="outLoginFunc()">
                <text class='account_fd3_0_c1_c1_c0'>确定</text>
              </view>
            </view>
          </view>
        </view>

        <!---flex布局flex布局结束-->

      </benben-popup>


    </view>
  </page-body>
</template>
<script>
  export default {
    components: {},


    data() {
      return {
        "popupShow1724834220700": false,
			info:{}
      };
    },
    computed: {

    },
    watch: {},
    onLoad(options) {

    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
				this.getinfo()
    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
			//获取个人资料
			async getinfo() {
				
				let url=''
				if(uni.getStorageSync('USER_GROUP')==1){
					url=global.apiUrls.post66f4cf3a2bf31
				}else{
					url=global.apiUrls.post671a23b16d698
				}
				let datastate = await this.$api.get(url, {
					
				});
			
				if (datastate.data.code != 1) {
					this.$message.info(datastate.data.msg);
					return
				}
			
				this.info = datastate.data.data
				if(uni.getStorageSync('USER_GROUP')==2){
					this.info.is_bang=this.info.mobile?1:0
				}
				// this.signInShow = this.state.status
			},
			jump(type){
				if(type==0){
					uni.navigateTo({
						url:'/pages/My/bindphone/bindphone'
					})
				}else{
					uni.navigateTo({
						url:'/pages/My/binding/binding?code='+this.info.mobile
					})
				}
			},
      //退出登录
      outLoginFunc() {
        this.popupShow1724834220700 = false
        this.$store.commit('logout')
        this.toLoginDiy();
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: #F8F8F8;
    background-size: 100% auto;
  }

  .account_flex_0 {
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .account_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .account_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .account_fd0_0_c0 {
    width: 120rpx;
  }

  .account_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .account_flex_1 {
    padding: 24rpx;
  }

  .account_fd1_0_c1 {
    width: 100%;
    height: 200rpx;
    padding: 32rpx 0rpx 32rpx 0rpx;
  }

  .account_fd1_0_c0_c1 {
    font-size: 20rpx;
    color: rgba(153, 153, 153, 1);
  }

  .account_fd1_0_c0_c0 {
    font-size: 32rpx;
    line-height: 45rpx;
    color: rgba(51, 51, 51, 1);
  }

  .account_fd1_0_c0 {
    border-bottom: 1px solid rgba(238, 238, 238, 1);
    width: 100%;
    height: 200rpx;
    padding: 32rpx 0rpx 32rpx 0rpx;
  }

  .account_fd1_0 {
    background: #Fff;
    border-radius: 16rpx;
    background-size: 100% auto;
    padding: 0rpx 024rpx 0rpx 024rpx;
  }

  .account_flex_2 {
    width: 750rpx;
    height: 150rpx;
    overflow: hidden;
    z-index: 10;
    bottom: calc(0rpx + var(--window-bottom));
  }

  .account_fd2_0 {
    background:#145efd;
    border-radius: 45rpx;
    width: 638rpx;
    line-height: 88rpx;
    font-size: 32rpx;
    color: #fff;
    height: 88rpx;
  }

  .account_fd3_0_c1_c1_c0 {
    color: rgba(51, 51, 51, 1);
    font-size: 32rpx;
    line-height: 45rpx;
    font-weight: 500;
  }

  .account_fd3_0_c1_c1 {
    width: 259rpx;
    height: 98rpx;
  }

  .account_fd3_0_c1_c0_c0 {
    font-size: 32rpx;
    line-height: 44rpx;
    color: rgba(153, 153, 153, 1);
  }

  .account_fd3_0_c1_c0 {
    border-right: 1px solid #eee;
    width: 259rpx;
    height: 98rpx;
  }

  .account_fd3_0_c1 {
    height: 99rpx;
  }

  .account_fd3_0_c0_c1 {
    margin: 0rpx 0rpx 030rpx 0rpx;
    font-size: 36rpx;
    color: #333;
    line-height: 50rpx;
    font-weight: 500;
  }

  .account_fd3_0_c0_c0 {
    font-size: 32rpx;
    line-height: 44rpx;
    color: rgba(153, 153, 153, 1);
    font-weight: 800;
  }

  .account_fd3_0_c0 {
    border-bottom: 1px solid #eee;
    height: 227rpx;
  }

  .account_fd3_0 {
    background: rgba(255, 255, 255, 1);
    border-radius: 25rpx;
    width: 540rpx;
    height: 332rpx;
    background-size: 100% auto;
  }
</style>
